<template>
	<view>{{num1}}</view>
	<view>{{num2}}</view>
	<view>{{arr[2]}}</view>
	<view>{{obj}}</view>
</template>

<script setup>
import { ref } from 'vue';

let num1 = 5
setInterval(() => {
	num1++
	console.log("num1", num1)
}, 1000)

let num2 = ref(5)
setInterval(() => {
	num2.value++
	console.log("num2", num2.value)
}, 1000)

let arr = ref([1,2,3,4])
let obj = ref({
	name: '张三',
	age: 18
})
obj.value.name = '李四'
</script>

<style scoped lang="scss">

</style>
